<template>
    <div style="padding: 20px">
      <div class="headerBoxList">
        <svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M30 19H20C15.5817 19 12 22.5817 12 27C12 31.4183 15.5817 35 20 35H36C40.4183 35 44 31.4183 44 27C44 24.9711 43.2447 23.1186 42 21.7084" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 24.2916C4.75527 22.8814 4 21.0289 4 19C4 14.5817 7.58172 11 12 11H28C32.4183 11 36 14.5817 36 19C36 23.4183 32.4183 27 28 27H18" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>
        <span style="margin-left: 10px">连接过的电脑及RSA指纹</span>
      </div>
      <div class="contentBoxYY" style="">
        <el-collapse v-model="activeName" accordion>
          <el-collapse-item style="" v-for="(item,index) in listData" :key="index" :title="'🚩 '+ item.titleKey+` （${item.content.length}行）`" :name="index">
              <div style="background: #282828;color: rgb(101, 177, 235);padding-left:20px;border: none !important;" v-for="(data,j) in item.content" :key="j">
                 {{ data }}
              </div>
          </el-collapse-item>
        </el-collapse>
      </div>
    </div>
</template>
  
  <script>
  export default {
    name: "linkCompontrue",
    data() {
      return {
        activeName: 0,
        listData:[]
      };
    },
    mounted(){
      this.initFunction();
    },
    created() {
      
    },
    methods: {
      initFunction() {
        const stringData = `HNNTH:/ $ dumpsys adb    <=命令
ADB MANAGER STATE (dumpsys adb):
{
  debugging_manager={
    connected_to_adb=true
    last_key_received=CE:CC:DC:AC:EB:59:D4:49:43:3E:57:62:DA:71:FD:43   <=最后的指纹
    user_keys=QAAAAGeuV5CpcmzRWFkEq65kcn+XFZV7XeueMKq1FCsQTc+tmOSHHkLFLsNVSY7T+DqiYlcl4Lz9oAeGcHc6H+u9k1w01D/Ct9lBT4HJpa0pBqiyRwpr5M9RF9JpfBKZy8BUSfPhVNDKi/he26O9aae2JCs886NOKHsDl6bGWUh8EHUxsUxgIyUmV269OmmKS0JQFk/zEt42iIE3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elO5g+//fjccKb440Seu2P7hqx1SMFxeYPXonv4ChEdkwr71unOn270oTaPua8rnrkqockG/CAcaNaF6/IlPPbhbf7rcBiI0eOL0kpJC5ExZMudsVXruERdV7Qyv7mXb6LbxryE+gIdi3MePwN+dkzpUdgEAAQA= qwe@WFENG0221

    keystore=ABX  2��keyStoreo�� version    2��  adbKey/��  key �QAAAAGeuV5CpcmzRWFkEq65kcn+XFZV7XeueMKq1FCsQTc+tmOSHHkLFLsNVSY7T+DqiYlcl4Lz9oAeGcHc6H+
u9k1w01D/Ct9lBT4HJpa0pBqiyRwpr5M9RF9JpfBKZy8BUSfPhVNDKi/he26O9aae2JCs886NOKHsDl6bGWUh8EHUxsUxgIyUmV269OmmKS0JQFk/zEt42iIE3cBMQ9mPmhtbymRsCnXB2dwzEyL1CeqwCnNBxPkXAEua0Z7r7BNDL3cf4i087fkXtgt7gN0Bf+zAlbZ7gnN2+UDMg4seymcQmJi2gtrz3V/1KijfRqD3nAibc9PNSjqzSL2lxj08Mf5oDLKy4jufbj/jIEIskf0gaZBk8L7C2tVWs0B4CboedpBjp/49iRvdfCQ9SoK0z2lchfsfhFJ5BlhOV8NWbZLYQq9ya7uuz3UOgPH3umIaLGJrxami+DouOsZcUrnd8ePmGfh8UmjIWopuNZjZixEw7ftDV258thW7vLdtH8wqsT/BQ1C6gIq8dAmp2SMJiX7M7CuYBU3lOTKbop27xxbBBIQuuq7fq9vPrDudw7eAOQzPvlvmxm+Qe0UvplVrX1obadgK8YKmiH2L4Dc+wp7UMZElnj7OXJHn7WiAlz3O9RFsXo1bRGsIW20aiWc0vZWHNPZTcW5eOdcStANNQxBSqX6DIfgEAAQA= 330wang@330WANG���  
la
stConnection   �y���3  2  /   �QAAAAGdCBtGpRtqX2M7uzw0zHUyh/pVCEQrwqMWof1DJs2DCTfs9W0QblOB21aKH48PSOOtYAaUgKfNBwS5JVv0ecC83lcQYRVUBF7Bw18vpRzqZXkk7sm3ifUOn
+WN8LU6VhYgpk/nmiFXssyuDn3x5SvD+PBRlq8aJWM3Zrm8hWv4iC70OTa46/piGEPTSVbJ3MRITUrQMohIsYeaFUj7wKYffSr6dCZ9IdNO52c48Sg7SjFA51dzmvGPU0eUMNnamb+ZglIlmpxfbmsD4oJV+SBdZrjy5ogIAG1zAyQ4xIC7llUDkqnA5xg4uT0F5vKilzekiPz4G/wVJSvwv6iKKn5yTwx2pblw2yOMZcb+kJy+joc8Qs/llnu0Wzbu6jdKYDlivF8GhIVd/hJyIqd+RhfFyDW3e3S143IRo7L4x3nTDpBHXQbmu6G3DZQ9GdHouXr6gniLEEdsNhgxSrTq2Uuw/wVu4T5OH15FBZI8wac92rZglPhkKYQHu6Hazj2YaYWo549JL+YTIDfHaLiaGKw/nelO5g+//fjccKb440Seu2P7hqx1SMFxeYPXonv4ChEdkwr71unOn270oTaPua8rnrkqockG/CAcaNaF6/IlPPbhbf7rcBiI0eOL0kpJC5ExZMudsVXruERdV7Qyv7mXb6LbxryE+gIdi3MePwN+dkzpUdgEAAQA= qwe@WFENG0221�     �y�� 3  3   
  }
}

HNNTH:/ $ dumpsys usb                         <= 命令                                                                                                       
USB MANAGER STATE (dumpsys usb):                                                                                                                     
{                                                                                                                                                    
  device_manager={                                                                                                                                   
    handler={                                                                                                                                        
      current_functions_applied=true                                                                                                                 
      screen_locked=true                                                                                                                             
      connected=true                                                                                                                                 
      configured=true                                        这                                                                                        
      host_connected=false                                   些                                                                                        
      source_power=false                                     按                                                                                        
      sink_power=true                                        原                                                                                        
      usb_charging=true                                       字符                                                                                       
      hide_usb_notification=false                               显示                                                                                     
      audio_accessory_connected=false                                                                                                                
      kernel_state=CONFIGURED                                                                                                                        
    }                                                                                                                                                
  }                                                                                                                                                  
  host_manager={                                                                                                                                     
    num_connects=0                                                                                                                                   
  }                                                                                                                                                  
  port_manager={                                                                                                                                     
    is_simulation_active=false                                                                                                                       
    usb_ports={                                                                                                                                      
      port={                                                                                                                                         
        id=port0                                                                                                                                     
        supported_modes=dual, audio_acc                                                                                                              
      }                                                                                                                                              
      status={                                                                                                                                       
        connected=true                                                                                                                               
        current_mode=ufp                                                                                                                             
        power_role=sink                                                                                                                              
        data_role=device                                                                                                                             
        role_combinations=[                                                                                                                          
          {                                                                                                                                          
            power_role=source                                                                                                                        
            data_role=host                                                                                                                           
          }                                                                                                                                          
          {                                                                                                                                          
            power_role=sink                                                                                                                          
            data_role=device                                                                                                                         
          }                                                                                                                                          
        ]                                                                                                                                            
        contaminant_presence_status=not detected                                                                                                     
      }                                                                                                                                              
      can_change_mode=true                                                                                                                           
      can_change_power_role=false                                                                                                                    
      can_change_data_role=false                                                                                                                     
      connected_at_millis=711765640                                                                                                                  
      last_connect_duration_millis=0                                                                                                                 
    }                                                                                                                                                
    enable_usb_data_signaling=true                                                                                                                   
  }                                                                                                                                                  
  alsa_manager={                                                                                                                                     
    cards_parser=-1                                                                                                                                  
  }                                                                                                                                                  
  settings_manager={                                                                                                                                 
    user_settings=[                                                                                                                                  
      {                                                                                                                                              
        user_id=0                                                                                                                                    
        device_attached_activities=[                                                                                                                 
          {                                                                                                                                          
            activity={                                                                                                                               
              package_name=com.android.mtp                                                                                                           
              class_name=com.android.mtp.ReceiverActivity                                                                                            
            }                                                                                                                                        
            filters=[                                                                                                                                
              {                                                                                                                                      
                vendor_id=-1                                                                                                                         
                product_id=-1                                                                                                                        
                class=255                                                                                                                            
                subclass=255                                                                                                                         
                protocol=0                                                                                                                           
                manufacturer_name=null                                                                                                               
                product_name=null                                                                                                                    
                serial_number=null                                                                                                                   
              }                                                                                                                                      
              {                                                                                                                                      
                vendor_id=-1                                                                                                                         
                product_id=-1                                                                                                                        
                class=6                                                                                                                              
                subclass=1                                                                                                                           
                protocol=1                                                                                                                           
                manufacturer_name=null                                                                                                               
                product_name=null                                                                                                                    
                serial_number=null                                                                                                                   
              }                                                                                                                                      
            ]                                                                                                                                        
          }                                                                                                                                          
          {                                                                                                                                          
            activity={                                                                                                                               
              package_name=com.hihonor.photos                                                                                                        
              class_name=com.android.gallery3d.app.UsbDeviceActivity                                                                                 
            }                                                                                                                                        
            filters={                                                                                                                                
              vendor_id=-1                                                                                                                           
              product_id=-1                                                                                                                          
              class=6                                                                                                                                
              subclass=1                                                                                                                             
              protocol=1                                                                                                                             
              manufacturer_name=null                                                                                                                 
              product_name=null                                                                                                                      
              serial_number=null                                                                                                                     
            }                                                                                                                                        
          }                                                                                                                                          
          {                                                                                                                                          
            activity={                                                                                                                               
              package_name=com.baidu.netdisk                                                                                                         
              class_name=com.baidu.netdisk.iotusb.UsbAttachActivity                                                                                  
            }                                                                                                                                        
            filters={                                                                                                                                
              vendor_id=11231                                                                                                                        
              product_id=256                                                                                                                         
              class=-1                                                                                                                               
              subclass=-1                                                                                                                            
              protocol=-1                                                                                                                            
              manufacturer_name=null                                                                                                                 
              product_name=null                                                                                                                      
              serial_number=null                                                                                                                     
            }                                                                                                                                        
          }                                                                                                                                          
          {                                                                                                                                          
            activity={                                                                                                                               
              package_name=com.rfidresearchgroup.rfidtools                                                                                           
              class_name=cn.rrg.rdv.activities.tools.LoginActivity                                                                                   
            }                                                                                                                                        
            filters=[                                                                                                                                
              {                                                                                                                                      
                vendor_id=1027                                                                                                                       
                product_id=24577                                                                                                                     
                class=-1                                                                                                                             
                subclass=-1                                                                                                                          
                protocol=-1                                                                                                                          
                manufacturer_name=null                                                                                                               
                product_name=null                                                                                                                    
                serial_number=null                                                                                                                   
              }                                                                                                                                      
              {                                                                                                                                      
                vendor_id=1027                                                                                                                       
                product_id=24597                                                                                                                     
                class=-1                                                                                                                             
                subclass=-1                                                                                                                          
                protocol=-1                                                                                                                          
                manufacturer_name=null                                                                                                               
                product_name=null                                                                                                                    
                serial_number=null                                                                                                                   
              }                                                                                                                                      
              {                                                                                                                                      
                vendor_id=9025                                                                                                                       
                product_id=-1                                                                                                                        
                class=-1                                                                                                                             
                subclass=-1                                                                                                                          
                protocol=-1                                                                                                                          
                manufacturer_name=null                                                                                                               
                product_name=null                                                                                                                    
                serial_number=null                                                                                                                   
              }                                                                                                                                      
              {                                                                                                                                      
                vendor_id=5824                                                                                                                       
                product_id=1155                                                                                                                      
                class=-1                                                                                                                             
                subclass=-1                                                                                                                          
                protocol=-1                                                                                                                          
                manufacturer_name=null                                                                                                               
                product_name=null                                                                                                                    
                serial_number=null                                                                                                                   
              }                                                                                                                                      
              {                                                                                                                                      
                vendor_id=4292                                                                                                                       
                product_id=60000                                                                                                                     
                class=-1                                                                                                                             
                subclass=-1                                                                                                                          
                protocol=-1                                                                                                                          
                manufacturer_name=null                                                                                                               
                product_name=null                                                                                                                    
                serial_number=null                                                                                                                   
              }                                                                                                                                      
              {                                                                                                                                      
                vendor_id=1659                                                                                                                       
                product_id=8963                                                                                                                      
                class=-1                                                                                                                             
                subclass=-1                                                                                                                          
                protocol=-1                                                                                                                          
                manufacturer_name=null                                                                                                               
                product_name=null                                                                                                                    
                serial_number=null                                                                                                                   
              }                                                                                                                                      
              {                                                                                                                                      
                vendor_id=6790                                                                                                                       
                product_id=29987                                                                                                                     
                class=-1                                                                                                                             
                subclass=-1                                                                                                                          
                protocol=-1                                                                                                                          
                manufacturer_name=null                                                                                                               
                product_name=null                                                                                                                    
                serial_number=null                                                                                                                   
              }                                                                                                                                      
            ]                                                                                                                                        
          }                                                                                                                                          
        ]                                                                                                                                            
      }                                                                                                                                              
      {                                                                                                                                              
        user_id=10                                                                                                                                   
        device_attached_activities=[                                                                                                                 
          {                                                                                                                                          
            activity={                                                                                                                               
              package_name=com.android.mtp                                                                                                           
              class_name=com.android.mtp.ReceiverActivity                                                                                            
            }                                                                                                                                        
            filters=[                                                                                                                                
              {                                                                                                                                      
                vendor_id=-1                                                                                                                         
                product_id=-1                                                                                                                        
                class=255                                                                                                                            
                subclass=255                                                                                                                         
                protocol=0                                                                                                                           
                manufacturer_name=null                                                                                                               
                product_name=null                                                                                                                    
                serial_number=null                                                                                                                   
              }                                                                                                                                      
              {                                                                                                                                      
                vendor_id=-1                                                                                                                         
                product_id=-1                                                                                                                        
                class=6                                                                                                                              
                subclass=1                                                                                                                           
                protocol=1                                                                                                                           
                manufacturer_name=null                                                                                                               
                product_name=null                                                                                                                    
                serial_number=null                                                                                                                   
              }                                                                                                                                      
            ]                                                                                                                                        
          }                                                                                                                                          
          {                                                                                                                                          
            activity={                                                                                                                               
              package_name=com.hihonor.photos                                                                                                        
              class_name=com.android.gallery3d.app.UsbDeviceActivity                                                                                 
            }                                                                                                                                        
            filters={                                                                                                                                
              vendor_id=-1                                                                                                                           
              product_id=-1                                                                                                                          
              class=6                                                                                                                                
              subclass=1                                                                                                                             
              protocol=1                                                                                                                             
              manufacturer_name=null                                                                                                                 
              product_name=null                                                                                                                      
              serial_number=null                                                                                                                     
            }                                                                                                                                        
          }                                                                                                                                          
        ]                                                                                                                                            
      }                                                                                                                                              
    ]                                                                                                                                                
    profile_group_settings=[                                                                                                                         
      {                                                                                                                                              
        parent_user_id=0                                                                                                                             
      }                                                                                                                                              
      {                                                                                                                                              
        parent_user_id=10                                                                                                                            
      }                                                                                                                                              
    ]                                                                                                                                                
  }                                                                                                                                                  
  permissions_manager={                                                                                                                              
    user_permissions=[                                                                                                                               
      {                                                                                                                                              
        user_id=0                                                                                                                                    
      }                                                                                                                                              
      {                                                                                                                                              
        user_id=10                                                                                                                                   
      }                                                                                                                                              
    ]                                                                                                                                                
  }                                                                                                                                                  
}                                                                                                                                                    
HNNTH:/ $            




HWLON:/ $ dumpsys usb  <=注意命令的输出
USB MANAGER STATE (dumpsys usb):
{
  device_manager={
    handler={
      current_functions_applied=true
      screen_locked=true
      connected=true
      configured=true
      host_connected=false
      source_power=false
      sink_power=true
      usb_charging=true
      hide_usb_notification=false
      audio_accessory_connected=false
      adb_enabled=true
      kernel_state=CONFIGURED
    }
    debugging_manager={    -> 有时这个输出在命令dumpsys adb中
      connected_to_adb=true
      last_key_received=C6:4F:96:13:ED:97:00:E4:56:89:64:57:81:7A:46:A7
      user_keys=QAAAAGeuV5CpcmzRWFkEq65kcn+XFZV7XeueMKq1FCsQTc+tmOSHHkLFLsNVSY7T+DqiYlcl4Lz9oAeGcHc6H+u9k1w01D/Ct9lBT4HJpa0pBqiyRwpr5M9RF9JpfBKZy8BUSfPhVNDKi/he26O9aae2JCs886NOKHsDl6bGWUh8EHUxsUxgIyUmV269OmmKS0JQFk/zEt42iIE3cBMQ9mPmhtbymRsCnXB2dwzEyL1CeqwCnNBxPkXAEua0Z7r7BNDL3cf4i087fkXtgt7gN0Bf+zAlbZ7gnN2+UDMg4seymcQmJi2gtrz3V/1KijfRqD3nAibc9PNSjqzSL2lxj08Mf5oDLKy4jufbj/jIEIskf0gaZBk8L7C2tVWs0B4CboedpBjp/49iRvdfCQ9SoK0z2lchfsfhFJ5BlhOV8NWbZLYQq9ya7uuz3UOgPH3umIaLGJrxami+DouOsZcUrnd8ePmGfh8UmjIWopuNZjZixEw7ftDV258thW7vLdtH8wqsT/BQ1C6gIq8dAmp2SMJiX7M7CuYBU3lOTKbop27xxbBBIQuuq7fq9vPrDudw7eAOQzPvlvmxm+Qe0UvplVrX1obadgK8YKmiH2L4Dc+wp7UMZElnj7OXJHn7WiAlz3O9RFsXo1bRGsIW20aiWc0vZWHNPZTcW5eOdcStANNQxBSqX6DIfgEAAQA= 330wang@330WANG

    }
  }
  host_manager={
    num_connects=0
  }
  port_manager={
    is_simulation_active=false
    usb_ports={
      port={
        id=otg_default
        supported_modes=dual
      }
      status={
        connected=true
        current_mode=ufp
        power_role=sink
        data_role=device
        role_combinations=[
          {
            power_role=source
            data_role=host
          }
          {
            power_role=source
            data_role=device
          }
          {
            power_role=sink
            data_role=host
          }
          {
            power_role=sink
            data_role=device
          }
        ]
      }
      can_change_mode=true
      can_change_power_role=true
      can_change_data_role=true
    }
  }
  alsa_manager={
    cards_parser=-1
  }
  settings_manager={
    profile_group_settings={
      parent_user_id=0
    }
  }
}                                                                                                                                
`;
        // 设置截取标题数组
        const delimiters = [
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "device_manager",
        "device_manager",
        "device_manager",
        "device_manager",
        "device_manager",
        "device_manager",
        "device_manager",
        "device_manager",
        "device_manager",
        "device_manager",
        "device_manager",
        "device_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        "debugging_manager",
        ];
  
        const dataArray = [];
  
        for (let i = 0; i < delimiters.length; i++) {
          const delimiter = delimiters[i];
          const startIndex = stringData.indexOf(delimiter);
          const endIndex =i < delimiters.length - 1? stringData.indexOf(delimiters[i + 1]): stringData.length;
  
          if (startIndex !== -1 && endIndex !== -1) {
            const data = stringData.slice(startIndex, endIndex).trim();
            dataArray.push(data);
          }
        }
        let arr = [];
        // 格式化字符串数组为json数据
        for (let index = 0; index < dataArray.length; index++) {
          const element = dataArray[index];
          const originalString = element;
          const delimiter = "\n";
  
          const delimiterIndex = originalString.indexOf(delimiter);
  
          if (delimiterIndex !== -1) {
            const firstPart = originalString.substring(0, delimiterIndex).trim();
            const secondPart = originalString
              .substring(delimiterIndex + 1)
              .trim();
            let item = {
              titleKey: firstPart,
              content: secondPart.split("\n"),
            };
            arr.push(item);
          } else {
            console.log("Delimiter not found in the string.");
          }
  
          // arr.push(item)
        }
        this.listData = arr;
      },
    },
  };
  </script>
  
  <style scoped>
  .headerBoxList {
    width: 100%;
    height: 50px;
    border-bottom: 1px solid #d2d2d2;
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
  }
  .contentBoxYY{
      width: 95%; 
      margin: 0 auto;
      overflow: hidden;
      height:95vh;
      overflow-y: auto;
  }
  @media screen and (min-width: 2360px) {
      .contentBoxYY{
          width: 95%; 
          margin: 0 auto;
          overflow: hidden;
          height:67vh;
          overflow-y: auto;
      }
  }
  
  </style>